home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01b.txt
/
000067_icon-group-sender_Fri May 18 16:28:41 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
3KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f4INRMg16724
for icon-group-addresses; Fri, 18 May 2001 16:27:22 -0700 (MST)
Message-Id: <200105182327.f4INRMg16724@baskerville.CS.Arizona.EDU>
From: Chris.D.Tenaglia@jci.com
Subject: Re: Question about entering text/password
To: acarr@email.arizona.edu
Cc: icon-group@cs.arizona.edu
Date: Fri, 18 May 2001 15:11:41 -0500
X-MIMETrack: Serialize by Router on jwimkrs1.na.jci.com/NA/Johnson_Controls(Release 5.0.6a
|January 17, 2001) at 05/18/2001 03:27:36 PM
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 2137
Here's a code snipit I did on DOS Icon.
kbhit and getch do not behave the same
on all platforms. They work good on
solaris and tru-64, but not on hp-ux.
------------------------------------------------------------------------------
Chris Tenaglia, technical analyst, Johnson Controls
____________________________________________
procedure main()
username := input("Username:")
password := ""
writes("Password:")
until kbhit() do
{
press := getch()
if press == "\r" then break
writes("*")
password ||:= press
}
write("\n\nThe password was ",image(password))
end
procedure input(prompt)
writes(prompt)
return read()
end
acarr@email.a
rizona.edu To: icon-group@CS.Arizona.EDU
cc:
05/15/01 Subject: Question about entering text/password
11:35 PM
Good Morning,
I am trying to write a program that requires a password, now I have been
able to read the password from input but it echoes to the screen as plain
text.
For example:
username: Foo
password: Bar
What I want to do is either:
password: ***
-or-
password:
Much like Unix in the last case.
Right now I'm just reading the field with a password := read() command,
I'm pretty sure that someone would know how to do it.
Thank you --
-- Andrew Carr
acarr@email.arizona.edu
*** NEW EMAIL ADDRESS!!!! ***
AIM: Andyrew480 ICQ: 3100804